-
Notifications
You must be signed in to change notification settings - Fork 290
feat: profile completion card #5254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds a new ProfileCompletionCard component that encourages users to complete their profile by showing their progress and the next incomplete section. The card displays in the first feed slot and takes priority over the brief card, using the existing ProfileCompletion logic and displaying a cabbage-themed design. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
- Use softer, less saturated brand purple colors for border and button - Replace generic text with benefit-focused copy for each profile section - Add section-specific CTAs that explain the value of completing each field 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
…ing sections - Replaced custom brand color scheme with default card styling (neutral border and background) - Added dismiss button to hide the card with action tracking - Changed card body to display all incomplete profile sections as a bullet list - Added ProfileCompletionCard action type for dismissal tracking - Updated useProfileCompletionIndicator to respect dismissal state 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
When the user dismisses the profile completion card, the brief card should not appear as a replacement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Create useProfileCompletionCard hook with useConditionalFeature to control card visibility via GrowthBook. Card only shows when feature is enabled, user is on My Feed, profile is incomplete, and card hasn't been dismissed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…card - Reorder hooks so profile card is evaluated before brief card - Brief card feature only evaluates when profile card definitively won't show - Add isLoading state to prevent brief card flash while profile card loads - Use hasNotDismissed pattern (requires isActionsFetched) to match brief card This ensures users are only exposed to one experiment at a time, preventing skewed A/B test statistics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add impression, click, and dismiss event tracking following the same pattern as marketing CTAs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
LogEvent.Dismiss doesn't exist - use Click with target_id to differentiate between CTA click and dismiss actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
rebelchris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude see my feedback, see if you agree or not / adjust what you agree with.
| }; | ||
|
|
||
| const profileCompletionCardBorder = | ||
| '1px solid color-mix(in srgb, var(--theme-accent-cabbage-subtler), transparent 50%)'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why is this not tailwind?
| '1px solid color-mix(in srgb, var(--theme-accent-cabbage-subtler), transparent 50%)'; | ||
|
|
||
| const profileCompletionCardBg = | ||
| 'linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 92%) 0%, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 96%) 100%)'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this should be in gradient file
| 'linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 92%) 0%, color-mix(in srgb, var(--theme-accent-cabbage-bolder), transparent 96%) 100%)'; | ||
|
|
||
| const profileCompletionButtonBg = | ||
| 'color-mix(in srgb, var(--theme-accent-cabbage-default), transparent 20%)'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can also be tailwind iirc
| const firstIncompleteItem = incompleteItems[0]; | ||
| const progress = profileCompletion?.percentage ?? 0; | ||
| const isCompleted = progress === 100; | ||
| const isDismissed = | ||
| isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard); | ||
|
|
||
| const shouldShow = | ||
| profileCompletion && !isCompleted && firstIncompleteItem && !isDismissed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there so much calculations in the useProfileCompletionCard hook and also here?
|
Claude finished @AmarTrebinjac's task in 1m 30s —— View job Reviewing PR feedbackTasks
Review FeedbackI've reviewed @rebelchris's comments and here's my analysis: 1. Lines 36-37, 42-43: Inline styles should be Tailwind✅ AGREE - These should be converted to Tailwind utilities where possible.
However, I notice the codebase has a pattern of using The question is: should these color-mix values be in the Tailwind config or as CSS variables? Looking at the existing pattern, it seems like the answer depends on reusability. 2. Line 40: Gradient should be in gradient file✅ STRONGLY AGREE - This is an established pattern in the codebase. Looking at
The profile completion card styles should follow this exact same pattern and be moved to
3. Line 118: Too many calculations split between hook and component🤔 PARTIALLY AGREE - There is some duplication, but it's not as bad as it might seem. Looking at the code: In the hook ( const isCompleted = (profileCompletion?.percentage ?? 100) === 100;
const isDismissed = isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard);
const shouldEvaluate = isMyFeed && !isCompleted && hasNotDismissed;In the component ( const progress = profileCompletion?.percentage ?? 0;
const isCompleted = progress === 100;
const isDismissed = isActionsFetched && checkHasCompleted(ActionType.ProfileCompletionCard);
const shouldShow = profileCompletion && !isCompleted && firstIncompleteItem && !isDismissed;The duplication is:
However, there's a reason: The hook is used in Possible improvements:
I'd say this is a minor issue - the duplication is only 2 simple calculations, and having the component be self-contained has benefits for testing and reusability. But if we want to be strict about DRY principles, we could refactor. Summary
The most important fix is moving the custom styles to |
Move custom color-mix styles from ProfileCompletionCard to the centralized custom.ts file, following the established pattern used by briefCardBorder/briefCardBg/briefButtonBg. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changes
Put a profile completion card in place of the brief card when the user has not completed his profile


Experiments
profile_completion_cardEvents
No new tracking events, using existing
completeActionmutation with new action type.Preview domain
https://profile-card-v2.preview.app.daily.dev